{section name=id loop=$kategorie}
<div class="kategorie-photogallery">
	{if $uprawnienia eq 1}<div class="kategoria-edytuj">
		<a style="float:left" href="{$smarty.const.HTTP_URL}{$smarty.request.page},,edytuj_kategorie,{$kategorie[id].pgID},{$kategorie[id].pgNazwa|frendlyurl}.html"><img src="{$smarty.request.HTTP_URL}public/skins/icons/16_edit.gif"  title="Edytuj dane galeri"  alt="edit"></a>
		<a style="float:left" href="{$smarty.const.HTTP_URL}{$smarty.request.page},PhotoGallery,pgKategoriaUp,{$kategorie[id].pgID},{$kategorie[id].pgNazwa|frendlyurl}.html"><img src="{$smarty.request.HTTP_URL}public/skins/icons/16_up.gif"  title="Do przodu"  alt="up"></a> {$kategorie[id].pgLp} 
		<a style="float:left" href="{$smarty.const.HTTP_URL}{$smarty.request.page},PhotoGallery,pgKategoriaDown,{$kategorie[id].pgID},{$kategorie[id].pgNazwa|frendlyurl}.html"><img src="{$smarty.request.HTTP_URL}public/skins/icons/16_down.gif"  title="Do tyłu"  alt="down"></a>
		<a style="float:left" href="{$smarty.const.HTTP_URL}{$smarty.request.page},PhotoGallery,zablokujGalerie,{$kategorie[id].pgID},{$kategorie[id].pgStatus},{$kategorie[id].pgNazwa|frendlyurl}.html"><img src="{$smarty.request.HTTP_URL}public/skins/icons/16_{if $kategorie[id].pgStatus eq 0}un{/if}lock.gif"  title="{if $kategorie[id].pgStatus eq 0}Zablokuj{else}Odblokuj{/if} galerię"  alt="lock"></a>
		<a style="float:left" onclick="$('#pytanie-text-{$kategorie[id].pgID}').dialog();"  ><img src="{$smarty.request.HTTP_URL}public/skins/icons/16_delete.gif"  title="Usuń galerię"  alt="del"></a>
		<!-- help -->
		<div id="pytanie-text-{$kategorie[id].pgID}" style="display: none;" title="Czy usunąc galerię">
			
			<p>Czy napewno usunąc galerie: {$kategorie[id].pgNazwa|truncate:$settings_photogallery.lista_kategorii_liczba_znakow_naglowka|wordwrap:17:" ":true|default:''}</p>
			<br/>
			<input type="button" value="Tak" onclick="document.location='{$smarty.const.HTTP_URL}{$smarty.request.page},PhotoGallery,usunGalerie,{$kategorie[id].pgID},{$kategorie[id].pgNazwa|frendlyurl}.html';"/>
			 <input type="button" value="Nie" onclick="$('#pytanie-text-{$kategorie[id].pgID}').dialog( 'destroy' );"/>
		</div>
		<!-- /help -->	
	</div>
	{/if}
	<div class="kategoria-wiecej">
		<a style="float:left; " href="{$smarty.const.HTTP_URL}{$smarty.request.page},,wyswietlZdjecia,{$kategorie[id].pgID},{$kategorie[id].pgNazwa|frendlyurl}.html">zobacz galerię</a>
	</div>
	<h3><a href="{$smarty.const.HTTP_URL}{$smarty.request.page},,wyswietlZdjecia,{$kategorie[id].pgID},{$kategorie[id].pgNazwa|frendlyurl}.html" title="{$kategorie[id].pgNazwa|wordwrap:17:" ":true|html2text}">{$kategorie[id].pgNazwa|truncate:$settings_photogallery.lista_kategorii_liczba_znakow_naglowka|wordwrap:17:" ":true|default:'nazwa kategorii'}</a></h3>
	
	{section name=th start=0 loop=$settings_photogallery.lista_kategorii_liczba_thumb|default:6 step=1} 
		
		{assign var=params0 value='PhotoGallery,ikonyGalerii,'}
		{assign var=params1 value=$kategorie[id].pgID}
		{assign var=params2 value=';'}
		{assign var=params3 value=$smarty.section.th.index}
		{dispatcher->handleEvent v=$params0$params1$params2$params3}
	
	{/section}
	{$kategorie[id].pgOpis|default:'opis kategorii...'|truncate:$settings_photogallery.lista_kategorii_liczba_znakow_opisu|wordwrap:17:" ":true|html2text}

	
</div>
{/section}


<script>
	$(document).ready(function(){ldelim}
		var border_color='';
		var background_color='';
		$(".kategorie-photogallery").mouseover(function(){ldelim}
			border_color = $(this).css("border-color");
			background_color = $(this).css("background-color");
			$(this).css("border-color","#00ff00");
			$(this).css("background-color","{$settings_photogallery.lista_kategorii_kolor_tla_mouseover|default:'#ffffff'}");
		{rdelim}).mouseout(function(){ldelim}
			$(this).css("border-color",border_color);
			$(this).css("background-color",background_color);
		{rdelim});
    
  {rdelim});
</script>



